// 2025/4/11
// 比那名居的桃子

#include <iostream>
#include <vector>
using namespace std;

int main() {
    int mDay = 0, n, k; cin >> n >> k;
    long long happy = 0, shame = 0;
    long long mHappy = 0, mShame = 0;
    vector<int> a(n), b(n);
    for(int i = 0; i < n; i++)
        cin >> a[i];
    for(int i = 0; i < n; i++)
        cin >> b[i];

    for(int i = 0; i < k; i++)
    {
        happy += a[i];
        shame += b[i];
    }
    mHappy = happy;
    mShame = shame;
    for(int i = k; i < n; i++)
    {
        happy += a[i] - a[i - k];
        shame += b[i] - b[i - k];
        if(happy > mHappy || (happy == mHappy && shame < mShame))
        {
            mDay = i - k + 1;
            mHappy = happy;
            mShame = shame;
        }
    }
    cout << mDay + 1 << endl;
    return 0;
}
// 64 位输出请用 printf("%lld")